/**
 * 
 */
package com.mc.hutool;

import java.io.File;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import cn.hutool.core.io.FileUtil;

/**
 * @author w.weizhen
 *
 */
public class JSONUtilTest
{
    
    /**
     * @param args
     */
    public static void main(String[] args)
    {
        
        //文件路径
        String user_dir = System.getProperty("user.dir") + File.separator + "data" + File.separator + "json" + File.separator;
        String detectAuthStr = FileUtil.readUtf8String(FileUtil.file(user_dir + "DetectAuth.txt"));
        JSONObject detectAuthJso = JSON.parseObject(detectAuthStr);
        
        System.out.println(detectAuthJso.toJSONString());
        
        detectAuthJso = detectAuthJso.getJSONObject("Response");
        
        String BizToken = detectAuthJso.getString("BizToken");
        String Url = detectAuthJso.getString("Url");
        String RequestId = detectAuthJso.getString("RequestId");
        
        System.out.println(detectAuthJso.toJSONString());
        System.out.println(BizToken);
        System.out.println(Url);
        System.out.println(RequestId);
        
    }
    
}
